<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateWeibosTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('weibos', function (Blueprint $table) {
            $table->increments('id');
            $table->unsignedBigInteger('wb_id')->unique();
            $table->text('body');
            $table->text('images');
            $table->enum('type',['favorate','myself','friend']);
            $table->unsignedTinyInteger('is_shown');
            $table->char('weibor');
            $table->char('avatar');
            $table->char('media_url');
            $table->char('long_url');
            $table->enum('media_type',['miaopai','bili','youku','acfun','text','vlook','xiaokaxiu','weibo'])->default('text');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('weibos');
    }
}
